<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<!-- 分页模块 -->
<th:block th:fragment="page">
    <div class="layui-row" th:if="${#mybatisPageUtil.pageInit(page,#request)}">
        <div class="layui-col-sm6">
            <div class="page-info">
                <span>显示 [[${page.current}]]/[[${page.size}]] 条，共 [[${page.records.size()}]] 条记录</span>
                <select class="timo-select page-number">
                    <option th:value="${num*10}" th:selected="${page.size} eq ${num*10}" th:each="num:${#numbers.sequence(1,3)}">[[${num*10}]] 条/页</option>
                </select>
            </div>
        </div>
        <div class="layui-col-sm6">
            <ul class="pagination list-page">
                <li class="page-item" th:if="${#mybatisPageUtil.isPrevious(page)}"><a class="page-link"
                    th:href="@{${#mybatisPageUtil.pageHref(page.current-1)}}">上一页</a>
                </li>
                <li th:class="'page-item'+ ${#mybatisPageUtil.pageActive(page, pageCode, 'active')}"
                    th:each="pageCode:${#mybatisPageUtil.pageCode(page)}">
                    <a class="page-link" th:if="${#mybatisPageUtil.isCode(pageCode)} ne true"
                       th:href="@{${#mybatisPageUtil.pageHref(pageCode)}}">[[${pageCode}]]</a>
                    <a class="page-link breviary" th:if="${#mybatisPageUtil.isCode(pageCode)}">…</a>
                </li>
                <li class="page-item" th:if="${#mybatisPageUtil.isNext(page)}"><a class="page-link"
                     th:href="@{${#mybatisPageUtil.pageHref(page.current+1)}}">下一页</a>
                </li>
            </ul>
        </div>
    </div>
</th:block>
